View Issue Details

IDProjectCategoryView StatusLast Update
0001301K18X001.00 SKB SWANSWpublic2021-11-02 09:15
Reporter(ALTech) Wooshin Kang Assigned To(SW) River WongDue Date2021-07-23 10:30
PrioritynormalSeveritys2-severeReproducibilityalways
Status closedResolutionreopened 
Summary0001301: Amp on/off as NUGU status.
DescriptionIn standby mode, if user call "aria", led command is called by NUGU.
SAM can help you about led command.

Please check possibility to implement below scenario.

< scenario>
1. pre condition -> standby mode, amps off
  
2. If you get "Listening Start command" for NUGU LED, please turn on AMPS.

TagsNo tags attached.
Attach Tags

Users monitoring this issue

User List (ALTech) Sangmin Choi , (ALTech) SY Yoon , (SW) River Wong

Activities

(SW) River Wong

2021-07-22 11:53

developer   ~0007712

Hi Wooshin,

I have two questions:
1.How about NUGU end and still in standby mode? Do it need to off the AMP again?
   If yes, can we know any led command is for NUGU off case?
2.Does Google Assistant also need to has audio in active standby mode?

(SW) River Wong

2021-07-23 09:28

developer   ~0007719

Hi Wooshin,

I heard from Brent that you only need to turn on AMP when NUGU starts at first time and does not need to turn amp off anymore after NUGU ends in active standby mode. If no problem, I will do it as this scenario.

For Google Assistant, you will need to wake up STB then you can use Google Assistant.

(SW) Bcan Yeh

2021-07-29 19:21

developer   ~0007762

Please check FW with the commit 'Enable Amp in active standby mode'.

(ALTech) Wooshin Kang

2021-08-18 15:15

developer   ~0007893

Done

(ALTech) Wooshin Kang

2021-10-12 13:15

developer   ~0008419

Last edited: 2021-10-12 13:27

Hi Bcan,

I found side effect like following when i use this scenario.
(side effect)
1. Please connect mobile phone with STB using bt button of front. DTB will be a2dp-devices of Mobile phone.
2. And go sleep mode ( Amp will be off )
3. Play music on mobile. There is no sound from STB.

So, we need to add condition for amp off at the moment to enter sleep mode.
<Additional condition>
1. Amp should be not off if there is a2dp connect with mobile.
2. If user press "bt-button" on front, amp should be "ON".

Thanks

(SW) Bcan Yeh

2021-10-13 10:48

developer   ~0008432

Hi Wooshin,

While playing music from mobile phone through BT, LED does not change.
We need use a different way to do this.
Is it a normal behavior to play music (of mobile phone) in standby mode (of AI2MAX) ?

(ALTech) Wooshin Kang

2021-10-13 12:54

developer   ~0008437

Hi Bcan,

Yes it is mandatory that sound out in sleep mode.
I think "Amp should be not off if there is a2dp connect with mobile" is different way.

Thanks.

(SW) River Wong

2021-10-13 17:54

developer   ~0008443

Last edited: 2021-10-13 17:54

Hi Wooshin,

There are two cases to consider the active standby.
Please help to check if the following behaviors are what you need.

1.During following actions, it needs to keep sound playing even user enters active standby mode. Is it right?
- NUGU TTS is playing
- AUX-IN plugin
- BT-Sink(BT mobile plays music)

2.After enter active standby mode and Wellang is also in standby mode, if user has the following actions, it needs to wake up Wellang amplifier.
- NUGU is triggered.
- AUX-IN plugin.
- BT button pressed. (When BT button pressed, there is BT TTS to warn user about the BT sink/BT source mode switch)
- A connected BT mobile starts to play music.
- Led status change as you discussed with Bcan (ex. Clock Alarm).

If these two behaviors are what you need, please help to check if I miss any "actions" in above two cases.

(ALTech) Wooshin Kang

2021-10-13 18:23

developer   ~0008444

Hi River,

Actually, I don't know how many test case for SKT, it is created by SKT QA not SKB.
Currently we have three cases like following at the moment.

First case)
1. bt sink mode pairing
2. enter sleep mode
3. play music on mobile phone
4. There is no sound because of amp off.

Second case)
1. Press bt button on Front panel.
2. There is no sound because of amp off.

Third case)
1. Connect NUGU app.
2. Go sleep mode
3. play music on NUGU app.

I know that "amp off" on sleep mode is not suitable but we have to off amp on sleep mode to save power.
Please understand why i request to implement it.

Thanks.

(SW) River Wong

2021-10-14 09:16

developer   ~0008449

Hi Wooshin,

I think customer(SKB or SKT) needs to define the spec of all behaviors first. Then we can follow it just like what we do in audio routing spec.
Otherwise, SKT QA will continue to report bugs about active standby.
And currently, the architecture of our code for active standby can not handle more and more cases you mentioned. So, we want to have the spec then we can consider how to make a code architecture to handle all cases.

(ALTech) Wooshin Kang

2021-10-14 09:34

developer   ~0008451

Hi River,

I understand your situation, but they(SKB and SKT) always tell me that "Please check Ai2 model and make same behavior with AI2"

Anyway, as above comment you have only 3 items to fix at the moment, help me.

Thanks.

(SW) River Wong

2021-10-14 09:46

developer   ~0008452

Hi Wooshin,

I will check the behavior of AI2 first and see how AI2 behavior. If I have any questions, I will post here later.
But for AUX, our product is AUX-in and AI2 is AUX-out. So, it can not follow AI2's behavior.

(ALTech) Wooshin Kang

2021-10-18 13:07

developer   ~0008474

Any update..?

(SW) River Wong

2021-10-18 14:56

developer   ~0008477

Last edited: 2021-10-18 14:58

Hi Wooshin,

Sorry for the late update. I tested AI2 and found we have the three fail cases as you mentioned in 0001301:0008444.
Except that, we also have extra one fail case that is different with AI2. It is as following:
1. bt sink mode pairing
2. play music on mobile phone
3. enter sleep mode
4. AI2 continues to have music from mobile phone. But SWAN has no sound because of amp off.

I am now change the code architecture to fix these issues. But it will take time to do it.
And for AUX-in , I will let it behave like BT mobile.

(ALTech) Wooshin Kang

2021-10-18 15:47

developer   ~0008479

Hi River,

Please update after commit.

Thanks.

(SW) River Wong

2021-10-18 17:13

developer   ~0008480

Hi Wooshin,

I will give you a test image before I commit. After the test image is ready, I will inform you.

(SW) River Wong

2021-10-18 18:59

developer   ~0008482

Hi Wooshin,

I did some tests on pass-through mode to test "bt button" and "set clock alarm after 1 minute".
AI2 knows when the audio stream starts and ends to switch between HDMI and Speaker, for example ding dong sound start/end or the women voice start/end for bt button, clock alarm sound start/stop.
In our current code, we can not know when the audio stream start and end for "bt button" and "clock alarm".
So, we need to have MiddleWare to notify us when the audio stream starts and ends for "bt button" and "clock alarm".
I think they can use AudioManager.setParameters() to notify us.

You can test the following case on AI2 for "bt button" and "clock alarm".
1. AI2 sets to passthrough mode. AI2 enters standby mode. Press BT button of AI2. It will has audio on Speaker. But after wake up AI2, the audio is switch to HDMI.
2. AI2 sets to passthrough mode. Set a clock alarm after 1 minute by Nugu. AI2 enters standby mode. After one minutes, it will has audio on Speaker. But after wake up AI2, audio is still playing on Speaker. After using NUGU to stop the alarm. The audio is switch to HDMI.

You can also try the following tests, AI2 did some special handling in Audio Routing for "bt button" and "clock alarm".
So I think MiddleWare may already did some notify to AI2 about audio stream starts/ends for "bt button" and "clock alarm".
1. AI2 sets to passthrough mode. Play local usb mp4. Press BT button of AI2. You will see AI2 perfectly switch between Speaker and HDMI when audio stream start and end.
2. AI2 sets to passthrough mode. Set a clock alarm after 1 minute by Nugu. After one minutes, You will see AI2 perfectly switch between Speaker and HDMI when audio stream start and end.

(ALTech) Wooshin Kang

2021-10-19 12:41

developer   ~0008489

Hi river,

following are test patch code for SKB NUGU.

=========================================================
diff --git a/audio/audio_hw.cpp b/audio/audio_hw.cpp
old mode 100644
new mode 100755
index b9c14e7..2135f14
--- a/audio/audio_hw.cpp
+++ b/audio/audio_hw.cpp
@@ -886,6 +886,22 @@ static int adev_set_parameters(struct audio_hw_device *dev,
             ALOGV("%s, line %d, adev->audioStreamIn == NULL", __FUNCTION__, __LINE__);
         }
     }
+
+ /* charmk, for test */
+ memset(str, 0x0, 32);
+ ret = ret = str_parms_get_str(parms, "nugu_amp", &str[0], 32);
+ {
+ if (!strcmp(str, "off"))
+ {
+ ALOGI("[charmk]===============> NUGU AMP OFF");
+ AMP_SND_SetMute(AMP_SND_PATH_71, true);
+ }
+ else if (!strcmp(str, "on"))
+ {
+ ALOGI("[charmk]===============> NUGU AMP ON");
+ AMP_SND_SetMute(AMP_SND_PATH_71, false);
+ }
+ }
 #endif
 
     ret = str_parms_get_int(parms, AUDIO_PARAMETER_DEVICE_DISCONNECT, &value);
===========================================================================

if "nugu_amp", "on" : nugu is working.

Please check if you can use it.

Thanks.

(SW) River Wong

2021-10-19 18:04

developer   ~0008498

Last edited: 2021-10-19 18:05

Hi Wooshin,

I found the audio stream of "Clock Alarm" will trigger both "nugu_amp" and "nugu_playback", so I think use the "nugu_playback" is enough.
But I found sometimes in active standby, there is no any "nugu_playback" or "nugu_amp" received in adev_set_parameters(), I am still checking how to reproduce it.

As for audio stream of "bt button", it is not related to "nugu_amp" or "nugu_playback". We do not receive any message in adev_set_parameters() when "bt button" is pressed. You can check it by "logcat | grep kvpairs". Could you check it with MiddleWare vendor, is there any way to know the audio start/end with "bt button"?

(ALTech) Wooshin Kang

2021-10-19 19:23

developer   ~0008501

Hi River,

M/W is not controlling "Bt sink key" on front panel. And they don't want to add special code only for some one.
Sangmig is working "bt key" scenario with Jim. So I think that you can see how to check bt key pressing on "https://mantis.cnsbg.foxconn.com/vaas/view.php?id=968".
A2dpDeviceService_Scenario_BFX-UA300_20211019.pdf (257,420 bytes) can help you.

Thanks.

(SW) River Wong

2021-10-20 09:17

developer   ~0008504

Last edited: 2021-10-20 09:20

Hi Wooshin,

I know how to detect "bt button" pressed as A2dpDeviceService did (this can be think as "bt button" audio sound starts). But the problem is that we can not know when the "bt button" audio sound ends.
So, in passthrough mode, if we unmute the amp when "bt button" is pressed, then we do not know when to mute amp. This will turn out to be a bug that youtube/iptv audio plays on speaker in
 passthrough mode.

If "bu button" sound end can not be detect, so far, we can do is to have "bt button" sound in non-passthroug mode during active standby. And no any "bt button" sound in passthrough mode during active standby.

(SW) River Wong

2021-10-20 09:35

developer   ~0008506

Hi Wooshin,

I check the log in AI2. I think M/W had done something to notify AI2 about the "bt button" sound.
When "bt button" sound starts, AI2 shows "audio_hw: adev_set_parameters() line 816: adev=0xedc03380 kvpairs=mute=132224"
When "bt button" sound ends, AI2 shows "audio_hw: adev_set_parameters() line 816: adev=0xedc03380 kvpairs=mute=131202"
I also notice that AI2 NUGU start/end has also these two messages.
Please ask MW to check why AI2 can receive these two messages for "bt button" sound start/end.
I think It is missed in SWAN since the Audio Routing event is changed and is different with AI2.

(ALTech) Wooshin Kang

2021-10-20 15:50

developer   ~0008510

Hi river,

Please check sptek's commit. you can use "nugu_playback = on and nugu_playback = off".

commit d1a2802a7c6f7893e24c95d511f24394ef18c130 (HEAD, skb/BFX-UA300_5.3.1, m/BFX-UA300_5.3.1)
Author: iohwang <iohwang@sptek.co.kr>
Date: Wed Oct 20 16:33:36 2021 +0900

    BTVSBOX-575 Add nugu_playback noti when BT_pairing on/off

(SW) River Wong

2021-10-20 16:10

developer   ~0008511

Hi Wooshin,

Thanks for your help. I will try Sptek's commit.

(SW) River Wong

2021-10-21 18:30

developer   ~0008538

Hi Wooshin,

I build a test image to fix the amp on/off in active standby. http://altserver01.iptime.org/release_by_fxn/swan_test_image/20211021_mantis1301_amp_on_ff_for_active_standby/
Please help to check if this test image meet all your requirements.

I tested the "Clock Alarm", "bt button", BT mobile, NUGU app to play music and Nugu in both passthrough and non-passthtough mode.
All cases are able to make amp on and be unmuted.

(ALTech) Wooshin Kang

2021-10-22 12:52

developer   ~0008551

Last edited: 2021-10-22 13:02

Hi River,

I found new issue.

1. go sleep mode
2. connect mobile phone
3. play music on mobile.
4. there is no sound in SWAN,

Please check it.

(ALTech) Wooshin Kang

2021-10-22 13:03

developer   ~0008552

I add log message.
logcat.log (3,136,125 bytes)

(SW) River Wong

2021-10-22 14:54

developer   ~0008559

Hi Wooshin,

I check the log and log is OK without problem. I think it may be your volume of iPhone is too small.
Please adjust SWAN volume and iPhone volume that you can hear. The test it again.

You can use the following command to check if Wellang Amp's status:
i2cget -f -y 0 0x2a 0x5d
0x01 : Amp on
0x00 : Amp off
When amp is on, you can check the mute status:
i2cget -f -y 0 0x2a 0xc0
0x00: Muted
0xff: Unmuted

(ALTech) Wooshin Kang

2021-10-22 15:26

developer   ~0008563

Hi River,

I think there is special case for no sound.
We have to find it.

Thanks.

(SW) River Wong

2021-10-22 16:55

developer   ~0008568

Last edited: 2021-10-22 17:52

Hi Wooshin,

Aftere check with Jim, there is a known issue that iPhone BT may cause no audio issue when iPhone goes from disconnect to connect. (Android phone does not have this issue.).
Jim has done a fix on it in mantis 968. Jim will commit the code today.
After he committed it, I will merge it and retest again.

(SW) River Wong

2021-10-22 18:18

developer   ~0008570

Hi Wooshin,

I integrate Jim's fix for iphone case and build a test image. http://altserver01.iptime.org/release_by_fxn/swan_test_image/20211022_mantis1301_amp_on_off_v2_for_Iphone/
I can reproduce iphone issue in previous test image and can not reproduce it in this image.
Please try it.

PS: We find it is easy to reproduce the issue when you disconnect iphone bt from SWAN at the same time while iphone is playing music. Then, next time you connect iphone bt to SWAN, it will has no audio.

(ALTech) Wooshin Kang

2021-10-25 13:25

developer   ~0008576

Hi River,

"No audio issue in i-phone" disappeared but I can see strange behavior after cold boot in this version.
I will check if i can see same issue in daily build.

Thanks.

(SW) River Wong

2021-10-26 15:14

developer   ~0008586

Hi Wooshin,

Do you have any finding about the audio drop issue?
Could you describe your detail reproduce steps and fail symptom then we can try to reproduce it.

(ALTech) Wooshin Kang

2021-10-26 17:19

developer   ~0008588

Hi River,

I didn't test using daily build version yet due other jobs.
I will test it tomorrow.

Thanks.

(ALTech) Wooshin Kang

2021-10-27 10:33

developer   ~0008591

Hi River,

I have 10 time test using daily build today version but i can't see audio drop issue.

Thanks.

(SW) River Wong

2021-10-27 10:54

developer   ~0008593

Hi Wooshin,

I test power on/off 20 times and play youtube after boot up. And I do not hear any audio drop in the test image.
Is my test steps different with yours?
Please describe your reproduce steps about how you see the audio drop issue.

(ALTech) Wooshin Kang

2021-10-27 11:57

developer   ~0008595

When i use below image, there was audio drop. I did just cold boot.
http://altserver01.iptime.org/release_by_fxn/swan_test_image/20211022_mantis1301_amp_on_off_v2_for_Iphone/
In daily built, was no drop.

(SW) River Wong

2021-10-27 12:38

developer   ~0008598

Hi Wooshin,

Do you hear audio drop when you play IPTV channel or BT mobile or any content?

(ALTech) Wooshin Kang

2021-10-27 13:07

developer   ~0008599

IPTV channel.

(SW) River Wong

2021-10-27 15:43

developer   ~0008602

Hi Wooshin,

Could you help to answer the following questions to let us know how to identify this issue:
1. When you find audio drop in IPTV, does Youtube also have audio drop issue?
2. Is the audio drop serious? Do you have video that can share to us about this?
Because in our environment, we can only simulate the IPTV streaming by ffmpeg, if the audio drop is slightly, it may not be easy to notice.

(ALTech) Wooshin Kang

2021-10-27 17:12

developer   ~0008606

Actually, it is reported by our QA and She is off today.
I will update tomorrow.

(ALTech) Wooshin Kang

2021-10-28 09:03

developer   ~0008610

Hi River,

She is done test but issue is not reproduced but she will test more i will inform you if any update.

thanks

(SW) River Wong

2021-11-01 16:47

developer   ~0008638

Hi Wooshin,

Could you reproduce it after more test?
I think I did not change any thing about audio processing in the test image. I just change the amp on/off status according to NUGU/BT Play/stop status.
So, I do not think it will cause any audio drop issue.

(ALTech) Wooshin Kang

2021-11-02 09:15

developer   ~0008643

Hi River,

I agree also your opinion and I told our QA like you.
Let's close it and create new ticket if similar issue happen in the future.

Issue History

Date Modified Username Field Change
2021-07-21 09:46 (ALTech) Wooshin Kang New Issue
2021-07-21 09:46 (ALTech) Wooshin Kang Status new => assigned
2021-07-21 09:46 (ALTech) Wooshin Kang Assigned To => (SW) Jacky Chiang
2021-07-22 11:46 (SW) River Wong Assigned To (SW) Jacky Chiang => (SW) River Wong
2021-07-22 11:53 (SW) River Wong Note Added: 0007712
2021-07-23 09:28 (SW) River Wong Note Added: 0007719
2021-07-23 09:51 (SW) Jacky Chiang Assigned To (SW) River Wong => (SW) Bcan Yeh
2021-07-29 19:21 (SW) Bcan Yeh Status assigned => resolved
2021-07-29 19:21 (SW) Bcan Yeh Resolution open => fixed
2021-07-29 19:21 (SW) Bcan Yeh Note Added: 0007762
2021-07-29 19:21 (SW) Bcan Yeh Assigned To (SW) Bcan Yeh => (ALTech) Wooshin Kang
2021-08-18 15:15 (ALTech) Wooshin Kang Status resolved => closed
2021-08-18 15:15 (ALTech) Wooshin Kang Note Added: 0007893
2021-10-12 13:15 (ALTech) Wooshin Kang Assigned To (ALTech) Wooshin Kang => (SW) Bcan Yeh
2021-10-12 13:15 (ALTech) Wooshin Kang Status closed => feedback
2021-10-12 13:15 (ALTech) Wooshin Kang Resolution fixed => reopened
2021-10-12 13:15 (ALTech) Wooshin Kang Note Added: 0008419
2021-10-12 13:17 (ALTech) Wooshin Kang Issue Monitored: (ALTech) Wooshin Kang
2021-10-12 13:18 (ALTech) Wooshin Kang Issue Monitored: (ALTech) SY Yoon
2021-10-12 13:18 (ALTech) Wooshin Kang Issue End Monitor: (ALTech) Wooshin Kang
2021-10-12 13:27 (ALTech) Wooshin Kang Note Edited: 0008419
2021-10-13 10:48 (SW) Bcan Yeh Note Added: 0008432
2021-10-13 10:48 (SW) Bcan Yeh Assigned To (SW) Bcan Yeh => (ALTech) Wooshin Kang
2021-10-13 12:54 (ALTech) Wooshin Kang Note Added: 0008437
2021-10-13 17:54 (SW) River Wong Note Added: 0008443
2021-10-13 17:54 (SW) River Wong Note Edited: 0008443
2021-10-13 17:54 (SW) River Wong Issue Monitored: (SW) River Wong
2021-10-13 18:23 (ALTech) Wooshin Kang Note Added: 0008444
2021-10-14 09:16 (SW) River Wong Note Added: 0008449
2021-10-14 09:34 (ALTech) Wooshin Kang Note Added: 0008451
2021-10-14 09:46 (SW) River Wong Note Added: 0008452
2021-10-18 13:07 (ALTech) Wooshin Kang Note Added: 0008474
2021-10-18 14:56 (SW) River Wong Note Added: 0008477
2021-10-18 14:58 (SW) River Wong Note Edited: 0008477
2021-10-18 15:47 (ALTech) Wooshin Kang Note Added: 0008479
2021-10-18 15:48 (ALTech) Wooshin Kang Issue Monitored: (ALTech) Sangmin Choi
2021-10-18 15:50 (ALTech) Wooshin Kang Assigned To (ALTech) Wooshin Kang => (SW) River Wong
2021-10-18 17:13 (SW) River Wong Note Added: 0008480
2021-10-18 18:59 (SW) River Wong Note Added: 0008482
2021-10-19 12:41 (ALTech) Wooshin Kang Note Added: 0008489
2021-10-19 12:41 (ALTech) Wooshin Kang Status feedback => assigned
2021-10-19 18:04 (SW) River Wong Note Added: 0008498
2021-10-19 18:05 (SW) River Wong Note Edited: 0008498
2021-10-19 18:05 (SW) River Wong Note Edited: 0008498
2021-10-19 19:23 (ALTech) Wooshin Kang Note Added: 0008501
2021-10-20 09:17 (SW) River Wong Note Added: 0008504
2021-10-20 09:20 (SW) River Wong Note Edited: 0008504
2021-10-20 09:35 (SW) River Wong Note Added: 0008506
2021-10-20 15:50 (ALTech) Wooshin Kang Note Added: 0008510
2021-10-20 16:10 (SW) River Wong Note Added: 0008511
2021-10-21 18:30 (SW) River Wong Note Added: 0008538
2021-10-22 12:52 (ALTech) Wooshin Kang Note Added: 0008551
2021-10-22 13:02 (ALTech) Wooshin Kang Note Edited: 0008551
2021-10-22 13:03 (ALTech) Wooshin Kang File Added: logcat.log
2021-10-22 13:03 (ALTech) Wooshin Kang Note Added: 0008552
2021-10-22 14:54 (SW) River Wong Note Added: 0008559
2021-10-22 15:26 (ALTech) Wooshin Kang Note Added: 0008563
2021-10-22 16:55 (SW) River Wong Note Added: 0008568
2021-10-22 17:52 (SW) River Wong Note Edited: 0008568
2021-10-22 18:18 (SW) River Wong Note Added: 0008570
2021-10-25 13:25 (ALTech) Wooshin Kang Note Added: 0008576
2021-10-26 15:14 (SW) River Wong Note Added: 0008586
2021-10-26 17:19 (ALTech) Wooshin Kang Note Added: 0008588
2021-10-27 10:33 (ALTech) Wooshin Kang Note Added: 0008591
2021-10-27 10:54 (SW) River Wong Note Added: 0008593
2021-10-27 11:57 (ALTech) Wooshin Kang Note Added: 0008595
2021-10-27 12:38 (SW) River Wong Note Added: 0008598
2021-10-27 13:07 (ALTech) Wooshin Kang Note Added: 0008599
2021-10-27 15:43 (SW) River Wong Note Added: 0008602
2021-10-27 17:12 (ALTech) Wooshin Kang Note Added: 0008606
2021-10-28 09:03 (ALTech) Wooshin Kang Note Added: 0008610
2021-11-01 16:47 (SW) River Wong Note Added: 0008638
2021-11-02 09:15 (ALTech) Wooshin Kang Note Added: 0008643
2021-11-02 09:15 (ALTech) Wooshin Kang Status assigned => closed